home *** CD-ROM | disk | FTP | other *** search
- unit uPostURL;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, TntStdCtrls;
-
- type
- TfrmBookmark = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Label1: TLabel;
- Edit1: TTnTEdit;
- Label2: TLabel;
- Memo: TTnTMemo;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- frmBookmark: TfrmBookmark;
-
- implementation
-
- {$R *.dfm}
-
- procedure TfrmBookmark.Button1Click(Sender: TObject);
- begin
- if Trim(Edit1.Text) = '' then
- raise Exception.Create('You must specify a title');
- if Trim(Memo.Text) = '' then
- raise Exception.Create('You must specify an URL');
- ModalResult := mrOk;
- end;
-
- procedure TfrmBookmark.FormCreate(Sender: TObject);
- begin
- Memo.Text := 'http://';
- Memo.SelStart := Length(Memo.Text);
- end;
-
- end.
-